package com.maxd.service.helpTask;

import com.maxd.error.Result;
import com.maxd.model.HelpTakeOrder;
import com.maxd.model.HelpTask;
import com.maxd.model.HelpTaskDetails;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Map;


public interface HelpTaskService {

    Double sumMoneyByProfit(String time, Integer flag);

    Double sumPrice(String time, Integer flag);

    Integer countHelpTaskByCreateTime(String time, Integer flag);

    HelpTask selectById(Long Id);

    Result saveBody(HelpTask helpTask);

    int saveHelpTask(HelpTask helpTask, String HelpTaskDetails, Long userId ,Double money);


    int updateHelpTask(String helpTakeId,Integer state,String content);

    Page<Map<String,Object>> selectMyHelpTask(Integer state, Long userId, Pageable pageable);

    Page<Map<String,Object>> selectParticipationHelpTask(Integer state,Long userId,Pageable pageable);

    Page<HelpTask> selectHelpTaskList(Integer state,Pageable pageable);

    Page<HelpTask> selectHelpTaskLists(Integer state,String phone,Pageable pageable);

    Page<Map<String,Object>> selectAuditHelpTask(Integer state,Long userId,Pageable pageable);

    int finishHelpTask(HelpTask helpTask);

}
